Skip to content

docs(browser-navigation): add a Scenarios section to the SPEC - #52

Merged
ivanbanov merged 2 commits into
mainfrom
docs/navigation-spec-scenarios
Aug 27, 2026
Merged

docs(browser-navigation): add a Scenarios section to the SPEC#52
ivanbanov merged 2 commits into
mainfrom
docs/navigation-spec-scenarios

Conversation

@ivanbanov

Copy link
Copy Markdown
Member

What

Adds a ## Scenarios section to packages/dom/utils/navigation/SPEC.md (between ### Reload and ## API): 26 compact traces of interceptBackNavigation / watchSpentEntry behavior, grouped into one layer · release and consumption · forward, claims, reload · stacked layers · timing edges. Ships with the package (SPEC.md is in files), so a patch changeset rides along.

Why

The behavior contract was complete but stated one mechanism per prose bullet — nothing let a reader replay a concrete flow end to end. The scenarios are replayable episodes in the module's own vocabulary (arm, release, Back, Forward); the preamble defines release as a close the module didn't cause (external, imperative, or similar), keeping caller vocabulary like Escape out of this spec — that mapping belongs to the layer that owns the key.

Two outcomes the prose left implicit are now stated outright:

  • a deliberately released entry absorbs one Forward press — it can't be deleted, only left to soak the traversal;
  • any re-plant (a new layer, or a veto's re-arm) truncates every parked Forward watch above it.

🤖 Generated with Claude Code

ivanbanov and others added 2 commits August 27, 2026 11:03
26 compact traces of the guard's behavior — one layer, release and
consumption, forward/claims/reload, stacked layers, timing edges — each
replayable end to end in the module's own vocabulary (arm, release, Back,
Forward). States outright two outcomes the prose only implied: an
abandoned entry absorbs one Forward press, and any re-plant truncates
every parked watch above it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The function's job is a search with a refusal rule — find the sole
watcher whose claim matches the spent entry, or answer nobody — and
"resolve" carries the might-not-find-one that "offer to claimant"
implied away (a claimant read as already known when finding one is the
whole work).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ivanbanov
ivanbanov merged commit d8382a1 into main Aug 27, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant